package com.ruoyi.canteen.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.canteen.mapper.CanteenSpecialMapper;
import com.ruoyi.canteen.domain.CanteenSpecial;
import com.ruoyi.canteen.service.ICanteenSpecialService;

/**
 * 规格Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-10
 */
@Service
public class CanteenSpecialServiceImpl implements ICanteenSpecialService 
{
    @Autowired
    private CanteenSpecialMapper canteenSpecialMapper;

    /**
     * 查询规格
     * 
     * @param id 规格主键
     * @return 规格
     */
    @Override
    public CanteenSpecial selectCanteenSpecialById(Long id)
    {
        return canteenSpecialMapper.selectCanteenSpecialById(id);
    }

    /**
     * 查询规格列表
     * 
     * @param canteenSpecial 规格
     * @return 规格
     */
    @Override
    public List<CanteenSpecial> selectCanteenSpecialList(CanteenSpecial canteenSpecial)
    {
        return canteenSpecialMapper.selectCanteenSpecialList(canteenSpecial);
    }

    /**
     * 新增规格
     * 
     * @param canteenSpecial 规格
     * @return 结果
     */
    @Override
    public int insertCanteenSpecial(CanteenSpecial canteenSpecial)
    {
        return canteenSpecialMapper.insertCanteenSpecial(canteenSpecial);
    }

    /**
     * 修改规格
     * 
     * @param canteenSpecial 规格
     * @return 结果
     */
    @Override
    public int updateCanteenSpecial(CanteenSpecial canteenSpecial)
    {
        return canteenSpecialMapper.updateCanteenSpecial(canteenSpecial);
    }

    /**
     * 批量删除规格
     * 
     * @param ids 需要删除的规格主键
     * @return 结果
     */
    @Override
    public int deleteCanteenSpecialByIds(Long[] ids)
    {
        return canteenSpecialMapper.deleteCanteenSpecialByIds(ids);
    }

    /**
     * 删除规格信息
     * 
     * @param id 规格主键
     * @return 结果
     */
    @Override
    public int deleteCanteenSpecialById(Long id)
    {
        return canteenSpecialMapper.deleteCanteenSpecialById(id);
    }
}
